﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SIPO.Web.lists.Transaction
{
    public partial class monitoringDebiturJatuhTempo : BasePage
    {
        protected override void OnLoad(EventArgs e)
        {
            
            if (!IsPostBack)
            {
                string bulan = Request.Params["Bulan"] == null ? string.Empty : Request.Params["Bulan"].ToString();
                string periodeAwal = Request.Params["PeriodeAwal"] == null ? string.Empty : Request.Params["PeriodeAwal"].ToString();
                string periodeAkhir = Request.Params["PeriodeAkhir"] == null ? string.Empty : Request.Params["PeriodeAkhir"].ToString();


                //DateTime month = Convert.ToDateTime("1/1/2000");
                //for (int i = 0; i < 12; i++)
                //{
                //    DateTime NextMont = month.AddMonths(i);
                //    ListItem list = new ListItem();
                //    list.Text = NextMont.ToString("MMMM");
                //    list.Value = NextMont.Month.ToString();
                //    ddlBulan.Items.Add(list);
                //}


                //if (!bulan.Equals(string.Empty))
                //{
                //    ddlBulan.Items.FindByValue(bulan).Selected = true;
                //}

                if (!periodeAwal.Equals(string.Empty) && !periodeAkhir.Equals(string.Empty) || !bulan.Equals(string.Empty))
                {
                    txtPeriodeAwal.Text = periodeAwal;
                    txtPeriodeAkhir.Text = periodeAkhir;
                    txtPeriode.Text = bulan;
                }
            }

        }
    }
}